﻿using System;

namespace Portal.Api.FeedProvider
{
  /// <summary>
  /// Marks a Property for Rss Feed serialization.
  /// </summary>
  [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, Inherited=true, AllowMultiple=true)]
  public sealed class RssElementAttribute : Attribute
  {
    /// <summary>
    /// Constructor.
    /// </summary>
    /// <param name="elementType">The Type of the item Element.</param>
    public RssElementAttribute(ItemElementType elementType)
    {
      ItemElement = elementType;
    }

    /// <summary>
    /// The Type of the item Element.
    /// </summary>
    public ItemElementType ItemElement { get; set; }
  }
}
